package com.zby.simulationHibernate.util.reflect.property;


import com.zby.simulationHibernate.constant.AccessorStrategyConstant;
import com.zby.simulationHibernate.util.common.CommonUtil;

/**
 * Created By zby on 10:53 2019/1/28
 */

public final class PropertyAccessoryFactory {

//    private static final PropertyAccessor BASIC_PROPERTY_ACCESSOR = new BasicPropertyAccessor();
//    private static final PropertyAccessor DIRECT_PROPERTY_ACCESSOR = new PropertyAccessor();
//    private static final PropertyAccessor EMBEDDED_PROPERTY_ACCESSOR = new EmbeddedPropertyAccessor();
//    private static final PropertyAccessor MAP_ACCESSOR = new MapAccessor();
//    private static final PropertyAccessor NOOP_ACCESSOR = new NoopAccessor();
//
//    /**
//     * Created By zby on 12:18 2019/1/28
//     *
//     * @param pojoAccessorStrategy 存储策略
//     */
//    public PropertyAccessor getPOJOPropertyAccessor(String pojoAccessorStrategy) throws ClassNotFoundException {
//        if (CommonUtil.isNull(pojoAccessorStrategy) || AccessorStrategyConstant.PROPERTY.equals(pojoAccessorStrategy))
//            return BASIC_PROPERTY_ACCESSOR;
//        if (AccessorStrategyConstant.FIELD.equals(pojoAccessorStrategy))
//            return DIRECT_PROPERTY_ACCESSOR;
//        if (AccessorStrategyConstant.EMBEDDED.equals(pojoAccessorStrategy))
//            return EMBEDDED_PROPERTY_ACCESSOR;
//        if (AccessorStrategyConstant.MAP.equals(pojoAccessorStrategy))
//            return MAP_ACCESSOR;
//        if (AccessorStrategyConstant.NOOP.equals(pojoAccessorStrategy))
//            return NOOP_ACCESSOR;
//        throw new ClassNotFoundException("类型找不到");
//
//    }

}
